package neu.soft.mapper;

import neu.soft.constant.OrderStatus;

import neu.soft.entity.NormalOrder;
import neu.soft.entity.NormalOrderInfo;
import org.apache.ibatis.annotations.Mapper;


import java.util.List;
import java.util.Map;

@Mapper
public interface OrderMapper {

    public List<NormalOrder> findAllOrder();

    public List<NormalOrder> findUserOrder(String uid);

    public List<NormalOrderInfo> findAllOrderInfoById(String oid);

    public List<NormalOrderInfo> findNewOrderInfosById(String oid);
    //新增订单
    public int addOrder(NormalOrder normalOrder);
    public int addOrderInfo(Map<String,Object>map);

    public int addNewOrderInfo(Map<String,Object>map);
    //显示订单状态
    public OrderStatus showOrderStatus(Map<String, Object> map);

    //改变订单状态
    public int changeOrderStatus(Map<String,Object>map);

    public int changOrderType(Map<String,Object>map);

    //根据单号查询订单---多条件查询
    public NormalOrder findByOId(Map<String,Object>map);

    //根据订单号删除无效订单
    public int deleteUselessOrder(Map<String,Object>map);

}
